<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxMaterialNewImg extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_material_new_imgs', function (Blueprint $table) {
            $table->increments('id')->comment('序号');
            $table->string('view_url', 250)->default('')->comment('图片访问地址');
            $table->string('wx_view_url', 250)->default('')->comment('微信访问地址');
            $table->softDeletes();
            $table->timestamps();
            $table->index(['view_url','deleted_at'], 'index1');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_material_new_imgs');
    }
}
